/*
 * File: bms_balance.h
 *
 * Code generated for Simulink model 'bms_balance'.
 *
 * Model version                  : 1.71
 * Simulink Coder version         : 8.11 (R2016b) 25-Aug-2016
 * C/C++ source code generated on : Thu Sep 10 18:24:53 2020
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: STMicroelectronics->ST10/Super10
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_bms_balance_h_
#define RTW_HEADER_bms_balance_h_
#include <stddef.h>
#include <string.h>
#ifndef bms_balance_COMMON_INCLUDES_
# define bms_balance_COMMON_INCLUDES_
#include "rtwtypes.h"
//#include "array.h"
#endif                                 /* bms_balance_COMMON_INCLUDES_ */

#include "bms_balance_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif
extern uint16_T rtb_VltgRecv[64];

/* Block signals (auto storage) */
typedef struct {
  uint16_T BMS_BalanceEn[65];          /* '<Root>/UnbalanceJudge' */
} B_bms_balance_T;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  uint16_T delay_step[54];             /* '<Root>/UnbalanceJudge' */
  uint16_T counter[54];                /* '<Root>/UnbalanceJudge' */
  uint16_T CellBalEn[54];              /* '<Root>/UnbalanceJudge' */
  uint8_T out[54];                     /* '<Root>/UnbalanceJudge' */
  boolean_T init[54];                  /* '<Root>/UnbalanceJudge' */
} DW_bms_balance_T;

/* Real-time Model Data Structure */
struct tag_RTM_bms_balance_T {
  const char_T *errorStatus;
};

/* Block signals (auto storage) */
extern B_bms_balance_T bms_balance_B;

/* Block states (auto storage) */
extern DW_bms_balance_T bms_balance_DW;

/* Model entry point functions */
extern void bms_balance_initialize(void);
extern void bms_balance_step(void);
extern void bms_balance_terminate(void);

/* Real-time Model object */
extern RT_MODEL_bms_balance_T *const bms_balance_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'bms_balance'
 * '<S1>'   : 'bms_balance/UnbalanceJudge'
 */
#endif                                 /* RTW_HEADER_bms_balance_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
